package acm;

import java.util.Scanner;

public class 素因子去重 {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        long n = in.nextLong();
        int sum=1;
        long x=n;
        for (int i=2;i<=x;i++){
            if (x%i==0)
            {
                if (ispream(i))
                {
                    sum*=i;
                }
                while (x%i==0)
                {
                    x/=i;
                }
            }
        }
        System.out.print(sum);

    }
    public static boolean ispream(long x){
        for (int i=2;i<Math.sqrt(x);i++){
            if (x%i==0){
                return false;
            }
        }
        return true;
    }
}
